Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: API Option to Center Clusters on Points #228

Merged
merged 3 commits into from
Jul 25, 2024
Merged

Conversation

TurtIeSocks
Copy link
Owner

This adds an API option center_clusters that tells koji to make an attempt to recenter a cluster based on its points. This uses a variation of the Smallest Enclosing Circle problem to solve the new centers.

Sometimes it can fail to resolve a new center that still covers all of the points but it will automatically fallback to the original cluster if that happens. This generally happens on clusters that have a large number of points, clusters that don't particularly need re-centering anyway.

Despite the large number of operations happening, the code is quite speedy but it is opt in in case you don't want to bother.

Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
koji ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2024 2:32am

@TurtIeSocks TurtIeSocks merged commit 34ea1de into main Jul 25, 2024
3 checks passed
@TurtIeSocks TurtIeSocks deleted the center-clusters branch July 25, 2024 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant